#ifndef FACE_H
#define FACE_H

#include <QVector>
#include <QVector3D>

class QVector2D;

class Material;

class Face
{
public:
    Face(const QVector< const QVector3D* >& rkVertices,
         const QVector< const QVector3D* >& rkNormals,
         const QVector< const QVector2D* >& rkUVs,
         Material* pkMaterial);
    ~Face();

    bool isValid() const;

    const QVector< const QVector3D* >& vertices() const;
    const QVector< const QVector3D* >& normals() const;
    const QVector< const QVector2D* >& UVs() const;
    Material* material() const;

    QVector3D barycenter() const;

protected:
    Face(const Face&);
    Face& operator = (const Face&);

private:
    //------------------------------------------------
    //  Attributes.
    //------------------------------------------------
    bool m_bIsValid;

    QVector< const QVector3D* > m_kVertices;
    QVector< const QVector3D* > m_kNormals;
    QVector< const QVector2D* > m_kUVs;
    Material*                   m_pkMaterial;
};

#endif // FACE_H
